home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Sorting
- Caption = "Report Wizard"
- ClientHeight = 4665
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 6465
- LinkTopic = "Form1"
- ScaleHeight = 4665
- ScaleWidth = 6465
- StartUpPosition = 2 'CenterScreen
- Begin VB.CommandButton btnAscending
- Height = 300
- Left = 5430
- Picture = "Sorting.frx":0000
- Style = 1 'Graphical
- TabIndex = 20
- Top = 90
- Visible = 0 'False
- Width = 330
- End
- Begin VB.CommandButton btnDescending
- Height = 300
- Left = 5895
- Picture = "Sorting.frx":03D2
- Style = 1 'Graphical
- TabIndex = 19
- Top = 90
- Visible = 0 'False
- Width = 330
- End
- Begin VB.CommandButton btn4Sort
- Enabled = 0 'False
- Height = 315
- Left = 5820
- Picture = "Sorting.frx":0744
- Style = 1 'Graphical
- TabIndex = 18
- Tag = "A"
- Top = 2835
- Width = 330
- End
- Begin VB.CommandButton btn3Sort
- Enabled = 0 'False
- Height = 315
- Left = 5820
- Picture = "Sorting.frx":0B16
- Style = 1 'Graphical
- TabIndex = 17
- Tag = "A"
- Top = 2280
- Width = 330
- End
- Begin VB.CommandButton btn2Sort
- Enabled = 0 'False
- Height = 315
- Left = 5820
- Picture = "Sorting.frx":0EE8
- Style = 1 'Graphical
- TabIndex = 16
- Tag = "A"
- Top = 1755
- Width = 330
- End
- Begin VB.CommandButton btn1Sort
- Height = 315
- Left = 5820
- Picture = "Sorting.frx":12BA
- Style = 1 'Graphical
- TabIndex = 15
- Tag = "A"
- Top = 1170
- Width = 330
- End
- Begin VB.ComboBox cbo4SortFields
- Enabled = 0 'False
- Height = 315
- Left = 3540
- TabIndex = 9
- Top = 2835
- Width = 2175
- End
- Begin VB.ComboBox cbo3SortFields
- Enabled = 0 'False
- Height = 315
- Left = 3525
- TabIndex = 8
- Top = 2285
- Width = 2175
- End
- Begin VB.ComboBox cbo2SortFields
- Enabled = 0 'False
- Height = 315
- Left = 3510
- TabIndex = 7
- Top = 1735
- Width = 2175
- End
- Begin VB.ComboBox cbo1SortFields
- Height = 315
- Left = 3510
- TabIndex = 6
- Top = 1185
- Width = 2175
- End
- Begin VB.Frame Frame1
- Height = 3270
- Left = 90
- TabIndex = 5
- Top = 585
- Width = 2730
- Begin VB.PictureBox Picture1
- BorderStyle = 0 'None
- Height = 2925
- Left = 240
- Picture = "Sorting.frx":168C
- ScaleHeight = 2925
- ScaleWidth = 2235
- TabIndex = 21
- Top = 210
- Width = 2235
- End
- End
- Begin VB.CommandButton btnFinish
- Caption = "&Finish"
- Height = 375
- Left = 5160
- TabIndex = 3
- Top = 4200
- Width = 975
- End
- Begin VB.CommandButton btnNext
- Caption = "&Next >"
- Height = 375
- Left = 3975
- TabIndex = 2
- Top = 4200
- Width = 975
- End
- Begin VB.CommandButton btnBack
- Caption = "< &Back"
- Height = 375
- Left = 2985
- TabIndex = 1
- Top = 4200
- Width = 975
- End
- Begin VB.CommandButton btnCancel
- Cancel = -1 'True
- Caption = "Cancel"
- Height = 375
- Left = 1800
- TabIndex = 0
- Top = 4200
- Width = 975
- End
- Begin VB.Label Label6
- Caption = "You can sort records by up to four fields, in either ascending or descending order."
- Height = 450
- Left = 3165
- TabIndex = 14
- Top = 630
- Width = 3090
- End
- Begin VB.Label Label5
- Caption = "4"
- Height = 225
- Left = 3210
- TabIndex = 13
- Top = 2940
- Width = 225
- End
- Begin VB.Label Label4
- Caption = "3"
- Height = 225
- Left = 3210
- TabIndex = 12
- Top = 2370
- Width = 225
- End
- Begin VB.Label Label3
- Caption = "2"
- Height = 225
- Left = 3210
- TabIndex = 11
- Top = 1830
- Width = 225
- End
- Begin VB.Label Label2
- Caption = "1"
- Height = 225
- Left = 3210
- TabIndex = 10
- Top = 1290
- Width = 225
- End
- Begin VB.Label Label1
- Caption = "What sort order do you want for detail records?"
- Height = 285
- Left = 165
- TabIndex = 4
- Top = 195
- Width = 3630
- End
- Begin VB.Line Line3
- BorderColor = &H80000003&
- X1 = 105
- X2 = 6345
- Y1 = 3960
- Y2 = 3960
- End
- Begin VB.Line Line4
- BorderColor = &H80000005&
- X1 = 105
- X2 = 6345
- Y1 = 3975
- Y2 = 3975
- End
- Attribute VB_Name = "Sorting"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub btn1Sort_Click()
- If btn1Sort.Tag = "A" Then
- btn1Sort.Tag = "D"
- btn1Sort.Picture = btnDescending.Picture
- Else
- btn1Sort.Tag = "A"
- btn1Sort.Picture = btnAscending.Picture
- End If
- End Sub
- Private Sub btn2Sort_Click()
- If btn2Sort.Tag = "A" Then
- btn2Sort.Tag = "D"
- btn2Sort.Picture = btnDescending.Picture
- Else
- btn2Sort.Tag = "A"
- btn2Sort.Picture = btnAscending.Picture
- End If
- End Sub
- Private Sub btn3Sort_Click()
- If btn3Sort.Tag = "A" Then
- btn3Sort.Tag = "D"
- btn3Sort.Picture = btnDescending.Picture
- Else
- btn3Sort.Tag = "A"
- btn3Sort.Picture = btnAscending.Picture
- End If
- End Sub
- Private Sub btn4Sort_Click()
- If btn4Sort.Tag = "A" Then
- btn4Sort.Tag = "D"
- btn4Sort.Picture = btnDescending.Picture
- Else
- btn4Sort.Tag = "A"
- btn4Sort.Picture = btnAscending.Picture
- End If
- End Sub
- Private Sub btnNext_Click()
- Sorting.Hide
- ' Call PopulateSheet
- Call PopulateReportWizard
- End Sub
- Private Sub cbo1SortFields_Click()
- cbo2SortFields.Enabled = True
- btn2Sort.Enabled = True
- End Sub
- Private Sub cbo2SortFields_Click()
- cbo3SortFields.Enabled = True
- btn2Sort.Enabled = True
- End Sub
- Private Sub cbo3SortFields_Click()
- cbo4SortFields.Enabled = True
- btn2Sort.Enabled = True
- End Sub
- Private Sub Form_Load()
- Dim NumFields As Integer
- For NumFields = 0 To Grouping.lstFields.ListCount - 1
- Grouping.lstFields.ListIndex = NumFields
- cbo1SortFields.AddItem Grouping.lstFields.Text
- cbo2SortFields.AddItem Grouping.lstFields.Text
- cbo3SortFields.AddItem Grouping.lstFields.Text
- cbo4SortFields.AddItem Grouping.lstFields.Text
- Next NumFields
- End Sub
-